-
Notifications
You must be signed in to change notification settings - Fork 619
Catch fetchDeployMetadata error and redirect to 404 #5380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch fetchDeployMetadata error and redirect to 404 #5380
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @MananTank and the rest of your teammates on |
apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5380 +/- ##
=======================================
Coverage 45.70% 45.70%
=======================================
Files 1070 1070
Lines 55671 55671
Branches 4081 4081
=======================================
Hits 25446 25446
Misses 29536 29536
Partials 689 689
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
e50cd98 to
4b15db2
Compare
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances error handling in the `page.tsx` files for the `publish` and `deploy` routes. It introduces checks to call `notFound()` when metadata cannot be fetched, improving user experience by handling cases where the requested data is unavailable.
### Detailed summary
- In `apps/dashboard/src/app/(dashboard)/contracts/publish/[publish_uri]/page.tsx`:
- Added a check for `publishMetadataFromUri` and called `notFound()` if it is not present.
- In `apps/dashboard/src/app/(dashboard)/contracts/deploy/[compiler_uri]/page.tsx`:
- Added a check for `metadata` and called `notFound()` if it is not present.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
4b15db2 to
dc0ea8a
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on improving error handling in two pages of the dashboard by adding checks for missing metadata, leading to a
notFoundresponse when necessary.Detailed summary
page.tsxof thepublishdirectory, added a check forpublishMetadataFromUri. If not found, it callsnotFound().page.tsxof thedeploydirectory, added a check formetadata. If not found, it callsnotFound().